package me.zk;

import me.zk.inf.MathOperation;

import java.util.function.Predicate;
import java.util.stream.IntStream;

/**
 * @Author: zhang kai
 * @Date: 2022/06/22
 * @Description:
 */
public class Java8Tester {
    static int a = 10;
    public static void main(String[] args) {
        MathOperation op = (a, b) -> a + b;
        Java8Tester tester = new Java8Tester();
        System.out.println(tester.operate(1,2,op));

        Runnable r = () -> {System.out.println(a);};
        IntStream stream = IntStream.range(1, 100).filter(n -> n % 2 == 0);
        System.out.println(stream.count());

    }
    private int operate(int a, int b, MathOperation mathOperation){
        return mathOperation.operation(a, b);
    }
}
